package net.zjitc.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.zjitc.pojo.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface AdminMapper extends BaseMapper<Admin> {
    @Select("select * from vueshop_admin where username = #{username} and password = #{password}")
    public Admin login (Admin admin);
    @Select("select * from vueshop_admin where username = #{loginUsername}")
    public Admin selectByName(String loginUsername);
    @Update("update vueshop_admin set avatar = #{avatar} where username = #{username}")
    public int updateAvatar(Admin admin);
}
